.article-body {
  .gist {
    .gist-data,
    .blob-wrapper,
    .blob-wrapper table {
      background-color: $brand-black;
    }
    .gist-data {
      border-bottom: none;
    }
    .blob-wrapper tr:first-child td {
      padding-top: 10px !important;
    }
    .blob-wrapper tr:last-child td {
      padding-bottom: 10px !important;
    }
    .blob-num {
      color: transparentize($brand-gray, 0.4);
      border: none;
    }
    .blob-code {
      padding: 1px 10px 1px 20px !important;
    }
    .blob-code-inner {
      color: #FFF;
    }

    //アイテム表示確認時に下記を外す
    .gist-meta {
      display: none;
    }
  }

  //sytax lighlight
  .gist {
    .pl-s, .pl-pds, .pl-s .pl-pse .pl-s1, .pl-sr, .pl-sr .pl-cce, .pl-sr .pl-sre, .pl-sr .pl-sra {
      color: #B9CA4A;
    }
    .pl-c {
      color: #969896;
    }
    .pl-smi,  .pl-s .pl-s1 {
      color: #FFF;
    }
    .pl-k, .pl-en {
      color: #B38DCC;
    }
    .pl-e {
      color: #ff69b4;
    }
    .pl-c1 {
      color: #CC7B2B;
    }
  }
}

// copy button
.article-body {
  .gist {
    position: relative;
  }
}

.copyBtn {
  display: block;
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 2px $grid-basic;
  font-size: 0.8rem;
  color: #000;
  border-radius: 3px;
  cursor: pointer;
  background-color: transparentize(#FFF, 1 - 0.5);
  &:hover {
    background-color: transparentize(#FFF, 1 - 0.8);
  }
  .tooltip {
    opacity: 0;
    pointer-events: none;

    $tooltipWidth: 220px;
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    top: 0;
    width: $tooltipWidth;
    left: -($tooltipWidth + 8);
    padding: $grid-basic/2 $grid-basic;
    font-size: 0.9rem;
    background-color: #5CB85C;
    border-radius: 2px;
    color: #FFF;
    &:after {
      position: absolute;
      right: -$grid-basic;
      top: $grid-basic;
      content: "";
      height: 0;
      width: 0;
      border-style: solid;
      border-width: $grid-basic/2;
      border-color: transparent transparent transparent #5CB85C;
    }
  }
}
.copyBtn.copied {
  .tooltip {
    animation: 1.2s fade;
  }
}

@keyframes fade {
  0% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
